package io.github.talelin.latticy.common.configuration;

import org.kie.api.runtime.KieContainer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @authoer:wulongbo
 * @createDate:2022/8/8
 * @description:
 */
@Configuration
public class KieBeanConfig {
    @Resource
    KieConfig kieConfig;

    @Bean
    public MyKieContext myKieContext() {
        KieContainer kieContainer = kieConfig.kieContainer();
        return new MyKieContext(kieContainer);
    }
}
